home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr31 / zdiff12.zip / ZDIFF.DOC < prev    next >
Text File  |  1993-05-25  |  15KB  |  370 lines

  1.  
  2.                                  
  3.                                  ZDIFF v1.2
  4.                        The Archive/Directory comparator
  5.  
  6.                               Shareware program
  7.                       Copyright 1993, Christophe Dubourg
  8.                              Date : 1993, May 25
  9.  
  10.                                    ---*---
  11.  
  12.                               Table of contents
  13.  
  14.                       1 ........................Purpose
  15.                       2 ........................ Syntax
  16.                       3 ...................... Features
  17.                       4 .................. How it works
  18.                       5 ........................ Limits
  19.                       6 ....................... Remarks
  20.                       7 .................... Disclaimer
  21.                       8 ..... How to contact the author
  22.  
  23.                                    ---*---
  24.  
  25.  
  26.  
  27.  
  28. 1. Purpose :
  29. ------------
  30.  
  31.         ZDiff is a comparison utility program.
  32.  
  33.         You can compare a pair of archives, or a pair of directories, or
  34.         an archive and a directory. (that's the new of this !)
  35.         You obtain a sorted list of all the files, along with a status
  36.         line, showing the differences, if any.
  37.  
  38.  
  39. 2. Syntax :
  40. -----------
  41.  
  42.   ZDIFF <New Archive/Directory> <Old Archive/Directory>
  43.  
  44.         or
  45.  
  46.   ZDIFF <New Archive/Directory> <Old Archive/Directory> [options] [wildcards]
  47.  
  48.  
  49.         Note : To simplify the following, the archive or directory that
  50.         is compared to an other archive or directory will be called a
  51.         Set of files. There is a NEW set of files, and an OLD set of files.
  52.         (to determine the one that is Newer and the one that is Older,
  53.         for instance).
  54.  
  55.         The <New archive/directory> and <Old archive/directory> parameters
  56.         are needed (not optional).
  57.  
  58.         The order in which you specify the New/Old pair is relevant.
  59.         It will make the difference between a 'Deleted' file or 'Inserted'
  60.         file, or a 'Newer' and 'Older', or 'Bigger' and 'Smaller'.
  61.         (In fact, it will determine the output result)
  62.         
  63.         The NEW set of files must be specified first.
  64.         ---------------------------------------------
  65.  
  66.         Then, you may specify options and/or wildcards.
  67.  
  68.         a. Wildcards
  69.  
  70.         The wildcards may be used to restrict the files compared inside
  71.         the directory or archive. (for both the new and old sets, because
  72.         it would be unlogical to have two different wildcards).
  73.         The DOS standard wildcards are allowed.
  74.  
  75.         b. Options
  76.  
  77.         The options may be specified anywhere on the command line, and are
  78.         not case sensitive. The options are :
  79.  
  80.           /c  :  Country flag override.
  81.  
  82.         If the dates in the ZIP files are not well recognized, you may
  83.         use this option to force the date format to use while reading
  84.         ZIP files :
  85.  
  86.             /C0 - USA date format.      (MM/DD/YY)
  87.             /C1 - Swapped date format.  (DD/MM/YY)
  88.           
  89.           /d  :  Differences only.
  90.  
  91.         Once the two sets of files are compared, the output will only show
  92.         the files that have ANY difference in the 2 sets.
  93.         By default, all the files of the two sets are displayed.
  94.  
  95.           /h   :  Help !
  96.  
  97.         This display more help screens, and a copyright screen.
  98.  
  99.           /p   :  Pause
  100.  
  101.         With this option, ZDiff will prompt you before reading each set
  102.         of file. The purpose of this is essentially while using floppies.
  103.         For example, if you need to compare two sets that are on two
  104.         different floppies that have the same format, you'll have to insert
  105.         one disk, read the files from it, and then the second disk.
  106.         Maybe, you could compare 2 removable hard disks, or a hard disk
  107.         and an archive, or whatever.
  108.         
  109.           /q    :  Quick scan
  110.           
  111.         If a directory is involved in comparison, this permits to skip the
  112.         CRC calculation on each file of this directory, in order to
  113.         speed up the process. Of course, use this option with caution, 
  114.         since the comparison is made only with TimeStamp and Size !
  115.         (two files can have the same date and time of last modification,
  116.         same size, and be binary different : in this case, they will be
  117.         marked as 'Same').
  118.          
  119.           /r  :  Recurse directories.
  120.  
  121.         By default, the subdirectories are not searched, either in the
  122.         archive or the directory file structure. (to save time).
  123.         This switch allows the comparison of the full tree of directories.
  124.         Note : if you don't specify the -r option, the filenames that
  125.         contains a path in the archives are not treated at all.
  126.  
  127.           /v    :  Verbose output
  128.  
  129.         This options causes a status to be output at the end of comparison.
  130.         This report shows the number of files that are :
  131.  
  132.                 - Identical
  133.                 - Different
  134.                 - Newer
  135.                 - Older
  136.                 - Bigger
  137.                 - Smaller
  138.                 - Inserted
  139.                 - Deleted
  140.  
  141.         It may give an idea of the amount of differences between the two
  142.         sets, without having to analyze the whole output.
  143.  
  144.  
  145. 3. Features :
  146. -------------
  147.         Since this is a comparison program, you will probably want to know
  148.         how it compares the two sets of files :
  149.  
  150.         The keys of comparison are :
  151.  
  152. Name :  If two names of the sets don't match, either one is new or one is
  153.         deleted, depending on the order you specified for the comparison.
  154.         if the -r option is specified, the full filename must match.
  155.  
  156.         Once two files are found in both the 2 sets, a more precise
  157.         comparison occurs. The keys for comparison between two files that
  158.         have the same name are :
  159.  
  160. CRC  :  A CRC 32 bits calculation is made on the files to know if they are
  161.         absolutely identical or not.
  162.         Note : if one of the files is an archive of type LZH, LHA, ARC or
  163.         ZOO, then a 16 bits calculation is done instead, to match the CRC
  164.         that these archives use.
  165.         If the Quick option is set, no CRC calculation occurs, and files
  166.         are assumed binary identical.
  167.  
  168. Date :  To know which one is the oldest, or the newest.
  169.  
  170. Size :  To know which one is the biggest, or the smallest.
  171.  
  172.  
  173. 4. How it works
  174. ---------------
  175.         To compare two directories, you won't need nothing but ZDIFF.EXE.
  176.         But to compare two archives, or an archive and a directory, you'll
  177.         need the correct unarchiver in your PATH, to access the archives
  178.         you have specified.
  179.  
  180.         The program supports all the current archive formats that are
  181.         commonly used and that I am aware of :
  182.  
  183.                 ZIP, ARJ, LHA, LZH, PAK, ZOO, ARC.
  184.  
  185.         The needed unarchiver, for each extension is :
  186.  
  187.                 *.ZIP     PKUNZIP.EXE   (v1.10 or v2.04)
  188.  
  189.                 *.ARJ     ARJ.EXE       (v2.30)
  190.  
  191.                 *.LHA \
  192.                 *.LZH  -  LHA.EXE       (v2.12)
  193.                 *.PAK /
  194.  
  195.                 *.ZOO     ZOO.EXE       (v2.1)
  196.  
  197.                 *.ARC     PKUNPAK.EXE   (v3.61)
  198.                 
  199.         (each of these can be easily found on many BBS)
  200.  
  201.         Now, here how it works :
  202.         The program first checks if the archive or directory that you
  203.         specified exists. (to prevent an error after some precious seconds
  204.         of calculation). At this points, it decides if a 32 bit or 16 bit
  205.         calculation will occur (or no crc, if Quick mode is set).
  206.         Then, it analyze the NEW set, and then the OLD set.
  207.         Two choices, concerning each set of file :
  208.  
  209.         a. If it's an archive:
  210.  
  211.         The unarchiver is called, to obtain a list of each file in the
  212.         archive, along with the date, crc, size, and so on.
  213.         This list is saved in a temporary file.
  214.         (Using the TEMP environment variable)
  215.         Then, the temporary file is opened, and scanned for each file in it.
  216.         Since all the informations are already calculated by the unarchiver,
  217.         there's nothing to compute (the crc is already there).
  218.         
  219.         If this is NEW files, each file name is stored in memory, along with
  220.         all the informations needed to compare later.
  221.         If this is OLD files, a search is made in memory, to see if the file
  222.         already exists in the NEW directory. If yes, the comparison occurs,
  223.         and the status is updated accordingly. If not, the file information
  224.         is simply stored.
  225.  
  226.         b. If it's a directory:
  227.  
  228.         The directory is scanned, and all the files are opened, to obtain
  229.         the date, time, size, and a CRC calculation occurs.
  230.         (except if the Quick mode is set).
  231.         Each file entry is then treated like the archive file entry :
  232.         if NEW, then the information is just stored. If OLD, the file is
  233.         searched in memory, and then either added or updated in the list.
  234.  
  235.  
  236.         After all the files have been read (the NEW set and the OLD set of
  237.         files), the sorted list is sent to standard output.
  238.         Since you can redirect standard output, you could use this facility
  239.         to pipe the output to a filter program (FIND), or a viewer program
  240.         (LIST), or any filter program of your choice.
  241.  
  242.         Here are some examples :
  243.  
  244.         1.  ZDIFF NEWARC.ZIP OLDARC.ARJ | LIST /S
  245.  
  246.             This display the output via the LIST viewer program.
  247.             (if the archive contains sub-dirs, they are not included,
  248.             since no -r parameter is there).
  249.  
  250.         2.  ZDIFF /r NEWARC.ZIP OLDDIR *.DOC | FIND "Newer" | LIST /s
  251.  
  252.             This display, via list, all the NEW files in NEWARC.ZIP,
  253.             compared to OLDDIR directory and all its sub-dirs.
  254.             Only the .DOC files are processed.
  255.  
  256.         3.  ZDIFF NEWZIP.ZIP . -r -q -c1
  257.         
  258.             This output on screen the differences between the archive
  259.             NEWZIP.ZIP and the current directories, and the subdirectories.
  260.             A Quick scan of directories will be made (no CRC), so comparison
  261.             will be made on date, time and size only.
  262.             The date format used by PKUNZIP on this machine is the swapped
  263.             date format (DD/MM/YY).
  264.  
  265.         4.  ZDIFF -v . -r OLDARC.LHA /d /q
  266.         
  267.             This output on screen the differences between the current
  268.             directory and the archive OLDARC.LHA. Subdirs are scanned also.
  269.             A Verbose (-v) status is displayed at end of comparison.
  270.             Only the differences are shown (/d), and no CRC is calculated.
  271.             
  272.                         
  273. 5. Limits :
  274. -----------
  275.         All the files informations are stored in DOS memory. (no EMS)
  276.         It permits between 5500 to 9900 files to be stored, depending of
  277.         the path length - this is much enough, I guess.
  278.  
  279.         Note concerning the archives : if the -r option is not specified,
  280.         the files containing a path in their name are not included in the
  281.         comparison. Only the files in the main directory of the archive
  282.         are treated, and only the files in the specified directory are
  283.         specified also.
  284.  
  285.  
  286. 6. Remarks
  287. ----------
  288.         I made my possible to make this program free of bugs, but if ever
  289.         something is wrong with ZDIFF, tell me. I'll fix it ASAP.
  290.         Note that I'm aware of no bug at this moment...
  291.  
  292.         Note that ZDiff supports international information from DOS,
  293.         since PKUNZIP does. (it concerns the date format, used for
  294.         time comparison, that is different in US than in France, for
  295.         example). The KEYB country flag is used for this purpose, so you
  296.         don't have to load the NLSFUNC program. If KEYB country flag is
  297.         set, then I assume that DAY/MONTH information in ZIP files will
  298.         be swapped. (compared to US).
  299.         You can override (with the /C option) this state of thing, to
  300.         set a date format to use on your machine. See the 'Syntax' section.
  301.  
  302.  
  303. 7. Disclaimer
  304. -------------
  305.         Even if there is really no possibility for this program to
  306.         damage your data, here is the usual disclaimer message :
  307.  
  308.         As a shareware program, ZDIFF is distributed as-is.
  309.         The author disclaims all warranties, expressed or implied.
  310.         The author will assume no liability for damages either from the
  311.         direct use of this product or as a consequence of it's use.
  312.  
  313.         PKUNZIP, PKUNPAK, ZIP, ARJ, ZOO, PAK, LZH, LHARC, LHA are
  314.         copyrighted by their respective authors.
  315.  
  316.  
  317. 8. How to contact the author
  318. ----------------------------
  319.         If you like this program, and plan to use it, you may try it
  320.         during a 21 days period, after what I would appreciate a donation
  321.         from you.
  322.         I develop many tools for my own use, (this one helps me a lot!)
  323.         and I would like to share what I do with others.
  324.         If users gives me money, it will be a proof that my tools are
  325.         useful : in this case, I'll spend time to update them, and
  326.         adding features.
  327.  
  328.         Of course, you can send what you want, but I would like to precise
  329.         that when I want to have a Dollar check paid in my bank, it costs
  330.         me $11 (I live in France). So, if you want to send money, please
  331.         consider this, and send more than $11 !  ($20 would be good)
  332.  
  333.         An other option is sending cash notes in an enveloppe. If you
  334.         can do that, please send about $10 or more.
  335.  
  336.                         **   Thanks in advance.   **
  337.  
  338.               -------------------------------------------------
  339.               HERE IS MY ADDRESS         Christophe Dubourg
  340.               FOR MAIL, CHECKS, or       23, rue Victor Hugo
  341.               CASH :                     78370 PLAISIR
  342.                                          FRANCE
  343.               -------------------------------------------------
  344.  
  345.  
  346.   -->   Even if you don't send money, please feel free to send me your
  347.         remarks, suggestions, and specific problems encountered with
  348.         this program.
  349.  
  350.         It will be a pleasure to read your mail and to answer it !
  351.  
  352.         Don't hesitate to contact me, at the following addresses :
  353.  
  354.         ---------------------------------------------------------------
  355.         Compuserve                :   76476,550
  356.  
  357.         MCI Mail                  :   CDUBOURG  (453-6013)
  358.                                       or cdubourg@mcimail.com
  359.  
  360.         Internet                  :   cdubourg@borland.com
  361.  
  362.         At home (paper Mail)      :   Christophe Dubourg
  363.                                       23, rue Victor Hugo
  364.                                       78370 PLAISIR
  365.                                       FRANCE
  366.         ---------------------------------------------------------------
  367.  
  368.         Thanks for using ZDiff, I hope it helps.   //Christophe D.
  369.  
  370.